public class Duel {
    private Character attacker;
    private Character target;

    Duel(Character player, Character enemy) {
        attacker = player;
        target = enemy;
    }
    void getInput(String input) {
        if (input.toLowerCase().equals("attack"))
            attackCharacter(attacker, target);
        else
            System.out.println("Wrong action");
    }

    void attackCharacter(Character attacker, Character target) {
        Character.changeCurrentHealth(attacker, target);
    }
}
